package com.liaoyoule.multiple.dto;

import java.sql.Timestamp;
import java.util.Collection;
import java.util.Date;
import java.util.Objects;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.liaoyoule.multiple.dao.entity.RoleEntity;
import io.swagger.annotations.ApiModelProperty;
import org.jeecgframework.poi.excel.annotation.Excel;

/**
 * SystemUserDTO
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2017-02-18T14:27:27.547Z")
public class UserDTO {
  @Excel(name = "编号",orderNum = "1",needMerge=true)
  private int id;
  @Excel(name = "昵称",orderNum = "4",needMerge=true)
  private String nickname;
  private String password;
  @Excel(name = "姓名",orderNum = "2",needMerge=true)
  private String name;
  private Integer status;
  @Excel(name = "创建时间",orderNum = "6",needMerge=true)
  private Timestamp created;
  private String photo;
  private String telephone;
  private String description;
  @Excel(name = "邮箱",orderNum = "3",needMerge=true)
  private String email;
  private Integer gender;
  private Integer locationId;
  private String token;
  private Timestamp tryActivationDate;
  private String privince;
  @Excel(name = "城市",orderNum = "5",needMerge=true)
  private String city;
  private String salt;
  private Set<RoleEntity> roles;

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getNickname() {
    return nickname;
  }

  public void setNickname(String nickname) {
    this.nickname = nickname;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public Timestamp getCreated() {
    return created;
  }

  public void setCreated(Timestamp created) {
    this.created = created;
  }

  public String getPhoto() {
    return photo;
  }

  public void setPhoto(String photo) {
    this.photo = photo;
  }

  public String getTelephone() {
    return telephone;
  }

  public void setTelephone(String telephone) {
    this.telephone = telephone;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public Integer getGender() {
    return gender;
  }

  public void setGender(Integer gender) {
    this.gender = gender;
  }

  public Integer getLocationId() {
    return locationId;
  }

  public void setLocationId(Integer locationId) {
    this.locationId = locationId;
  }

  public String getToken() {
    return token;
  }

  public void setToken(String token) {
    this.token = token;
  }

  public Timestamp getTryActivationDate() {
    return tryActivationDate;
  }

  public void setTryActivationDate(Timestamp tryActivationDate) {
    this.tryActivationDate = tryActivationDate;
  }

  public String getPrivince() {
    return privince;
  }

  public void setPrivince(String privince) {
    this.privince = privince;
  }

  public String getCity() {
    return city;
  }

  public void setCity(String city) {
    this.city = city;
  }

  public Set<RoleEntity> getRoles() {
    return roles;
  }

  public void setRoles(Set<RoleEntity> roles) {
    this.roles = roles;
  }

  public String getSalt() {
    return salt;
  }

  public void setSalt(String salt) {
    this.salt = salt;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    UserDTO userDTO = (UserDTO) o;

    if (id != userDTO.id) return false;
    if (nickname != null ? !nickname.equals(userDTO.nickname) : userDTO.nickname != null) return false;
    if (password != null ? !password.equals(userDTO.password) : userDTO.password != null) return false;
    if (name != null ? !name.equals(userDTO.name) : userDTO.name != null) return false;
    if (status != null ? !status.equals(userDTO.status) : userDTO.status != null) return false;
    if (created != null ? !created.equals(userDTO.created) : userDTO.created != null) return false;
    if (photo != null ? !photo.equals(userDTO.photo) : userDTO.photo != null) return false;
    if (telephone != null ? !telephone.equals(userDTO.telephone) : userDTO.telephone != null) return false;
    if (description != null ? !description.equals(userDTO.description) : userDTO.description != null) return false;
    if (email != null ? !email.equals(userDTO.email) : userDTO.email != null) return false;
    if (gender != null ? !gender.equals(userDTO.gender) : userDTO.gender != null) return false;
    if (locationId != null ? !locationId.equals(userDTO.locationId) : userDTO.locationId != null) return false;
    if (token != null ? !token.equals(userDTO.token) : userDTO.token != null) return false;
    if (tryActivationDate != null ? !tryActivationDate.equals(userDTO.tryActivationDate) : userDTO.tryActivationDate != null)
      return false;
    if (privince != null ? !privince.equals(userDTO.privince) : userDTO.privince != null) return false;
    if (city != null ? !city.equals(userDTO.city) : userDTO.city != null) return false;
    if (roles != null ? !roles.equals(userDTO.roles) : userDTO.roles != null) return false;

    return true;
  }

  @Override
  public int hashCode() {
    int result = id;
    result = 31 * result + (nickname != null ? nickname.hashCode() : 0);
    result = 31 * result + (password != null ? password.hashCode() : 0);
    result = 31 * result + (name != null ? name.hashCode() : 0);
    result = 31 * result + (status != null ? status.hashCode() : 0);
    result = 31 * result + (created != null ? created.hashCode() : 0);
    result = 31 * result + (photo != null ? photo.hashCode() : 0);
    result = 31 * result + (telephone != null ? telephone.hashCode() : 0);
    result = 31 * result + (description != null ? description.hashCode() : 0);
    result = 31 * result + (email != null ? email.hashCode() : 0);
    result = 31 * result + (gender != null ? gender.hashCode() : 0);
    result = 31 * result + (locationId != null ? locationId.hashCode() : 0);
    result = 31 * result + (token != null ? token.hashCode() : 0);
    result = 31 * result + (tryActivationDate != null ? tryActivationDate.hashCode() : 0);
    result = 31 * result + (privince != null ? privince.hashCode() : 0);
    result = 31 * result + (city != null ? city.hashCode() : 0);
    result = 31 * result + (roles != null ? roles.hashCode() : 0);
    return result;
  }
}

